public class test {
    public static void main(String[] args) {
        int num=10,sum=0;
        for (;num<50;num+=10){
            sum+=num;
        }
        System.out.println(num);
        System.out.println(sum);
    }
}
